<!--
 * @Descripttion: 
 * @version: 
 * @Author: 高月飞
 * @Date: 2023-11-19 16:10:43
 * @LastEditors: 高月飞
 * @LastEditTime: 2023-11-21 14:48:22
-->
<template>
    <div class="mineBtn">
        <el-button type="primary" @click="openDialog">新增</el-button>
        <el-button type="primary" @click="exposeExcelCustomer">导出</el-button>
        <el-button type="success" @click="importExcelCustomer">导入</el-button>
        <el-button type="info" @click="transferCustomer">转移</el-button>
        <el-button type="success" @click="sharedCustomer">共享</el-button>
        <el-button type="warning" @click="goBackSea">退回公海</el-button>
    </div>
</template>

<script setup lang="ts">
import { ref, defineProps, defineEmits } from 'vue';
import { useRouter } from 'vue-router';

const emit = defineEmits(['openDialogFrom', "exposeCustomer", "importCustomer", "shareCustomer", "transCustomer"])
// 新增
const openDialog = () => {
    emit('openDialogFrom', true, 1)
};

// 导出数据
const exposeExcelCustomer = () => {
    emit('exposeCustomer', true)
}
// 导入数据
const importExcelCustomer = () => {
    emit('importCustomer', true)
}
//转移数据
const transferCustomer = () => {
    emit('transCustomer', true)
}
// 共享
const sharedCustomer = () => {
    emit('shareCustomer', true,2)
}
//退回公海
const router = useRouter()
const goBackSea = () => {
    router.replace('/customer/seas')
}



</script>

<style lang="scss" scoped>
.mineBtn {
    display: flex;
    justify-content: flex-start;
    align-items: center;

    .el-button {
        margin-left: 23px;
    }
}
</style>